package com.swh.service.Impl;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.swh.dao.SysRoleDao;
import com.swh.entity.QualificationCondition;
import com.swh.entity.SysRole;
import com.swh.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author: swh
 * @Description:
 * @Date: 2020/12/14 14:46
 * @Version: 1.0
 */
@Service
public class SysRoleServiceImpl extends BaseServiceImpl<SysRole> implements SysRoleService {

    @Autowired
    public SysRoleServiceImpl(SysRoleDao sysRoleDao) {
        super(sysRoleDao);
    }

    @Autowired
    private SysRoleDao sysRoleDao;

    @Override
    public PageInfo<Map> selectPage(Integer pageNum, Integer pageSize, QualificationCondition condition) {
        PageHelper.startPage(pageNum,pageSize);
        List<Map> list = sysRoleDao.selectPage((pageNum - 1) * pageSize, pageSize, condition);
        return new PageInfo<>(list);
    }

}
